<template>
  <object
    :data="url"
    type="application/pdf"
    width="100%"
    height="800"
  ></object>
</template>

<script lang="ts" setup>
import base64str from "./data.js";

let binary = atob(base64str.replace(/\s/g, ""));
let len = binary.length;
let buffer = new ArrayBuffer(len);
let view = new Uint8Array(buffer);
for (let i = 0; i < len; i++) {
  view[i] = binary.charCodeAt(i);
}
let blob = new Blob([view], {
  type: "application/pdf",
});

const url = URL.createObjectURL(blob);
</script>

<style scoped></style>
